package com.wwinsoft.oa.pojo.aftersales;

import java.util.Date;
import com.wwinsoft.framework.pojo.UIDisplayInterface;
import com.wwinsoft.modules.utils.DateUtils;
import com.wwinsoft.oa.entity.aftersales.AftersalesMaintain;

/**
 * @author: sevenSpend
 * @since 1.0
 */
public class AftersalesMaintainBean extends AftersalesMaintain implements UIDisplayInterface{
    private Date dueDate;
    private String assignee;
    private String taskName;
    private String userFullName;
    private String createName;
    private Date startTimeFrom;
    private Date startTimeTo;
    
    public AftersalesMaintainBean() {
        this.startTimeFrom = DateUtils.addDays(new Date(), -7);
        this.startTimeTo = new Date();
    }

    public Date getDueDate() {
        return dueDate;
    }
    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }
    public String getAssignee() {
        return assignee;
    }
    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }
    public String getTaskName() {
        return taskName;
    }
    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }
    public String getUserFullName() {
        return userFullName;
    }
    public void setUserFullName(String userFullName) {
        this.userFullName = userFullName;
    }
    public String getCreateName() {
        return createName;
    }
    public void setCreateName(String createName) {
        this.createName = createName;
    }
    public Date getStartTimeFrom() {
        return startTimeFrom;
    }
    public void setStartTimeFrom(Date startTimeFrom) {
        this.startTimeFrom = startTimeFrom;
    }
    public Date getStartTimeTo() {
        return startTimeTo;
    }
    public void setStartTimeTo(Date startTimeTo) {
        this.startTimeTo = startTimeTo;
    }
    @Override
    public boolean isOverDue() {
        if(dueDate==null){
            return false;
        }
        return DateUtils.isOverDue(dueDate) && !"2".equals(getStatus());
    }
}
